/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dmcn.bl.genetics.fitnessfunction;

import dmcn.bl.genetics.genes.Concetrator;
import dmcn.bl.genetics.input.Input;
import org.jgap.FitnessFunction;
import org.jgap.IChromosome;

/**
 *
 * @author Home
 */
public class AssignTerminalFitnessFunction extends FitnessFunction {

    private Input input;

    public AssignTerminalFitnessFunction(Input input) {
        this.input = input;
    }

    @Override
    protected double evaluate(IChromosome ic) {

        Evaluator evaluator = new Evaluator(input);
        Double d = evaluator.evaluate(ic);
        return (d == null) ? Integer.MAX_VALUE : d;

    }

    
}
